// var api = require("../../utils/api");
  var  app = getApp();
import {
  requst_get_getUserInfo
} from '../../utils/api.js'
import {adList} from "../../utils/adConfig.js";
Page({
  data: {
    user: "",
    pointCount: 0,
    bannerVideo:adList().bannerVideo
  },
  onLoad: function (e) {
    var that =this;
    requst_get_getUserInfo({}).then(res => {
      app.globalData.userInfo = res.data
      that.setData({
        user: res.data,
      })
    }).catch((err)=>{
      console.log("err",err);
    })
  },
  onReady: function () {},
  onShow: function () {
    this.setData({
      user:  app.globalData.userInfo
    })
  },
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  clearCache: function () {
    wx.navigateTo({
      url: '/pages/yhmine/mine'
    });
  },
  bindHandler: function (e) {
    console.log(e.currentTarget.dataset.url)
    var t = e.currentTarget.dataset.url;
    wx.navigateTo({
      url: t
    });
  },
});